package com.medata.repository;

import com.medata.dataObject.UserCollections;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;


public interface UserCollectionsRepository extends JpaRepository<UserCollections,Integer> {
    Page<UserCollections> findByUserName(String userName,Pageable pageable);

    void deleteById(Integer id);

    List<UserCollections> findAllByUserName(String userName);

    UserCollections findByUserNameAndWordAndWordId(String username,String word,Integer wordId);

    List<UserCollections> findByUserNameAndWord(String userName,String word);
}
